#include "stdafx.h"
#include "multip.h"

int** multip(int** A, int** B, int size_A, int size_B1, int size_B2)
{
	int** C;
	int k;
	C = new int*[size_A];
	for (int i = 0; i < size_A; i++)
	{
		C[i] = new int[size_B2];
		for (int j = 0; j < size_B2; j++)
			for (C[i][j] = 0, k = 0; k < size_A; k++)
			{
				C[i][j] += A[i][k] * B[k][j];
				//std::cout << C[i][j]<<std::endl;
			}
	}

	return C;
}